#include<iostream>

using namespace std;

void qsort(int* ans,int first,int end){
    if (first>=end) return;
    int i = first,j=end;
    int temp=*(ans+first),T;
    while(i<j)
    {
        while(*(ans+j)>=temp && i<j) j--;
        while (*(ans+i)<=temp && i<j) i++;
        if (*(ans+j)<*(ans+i) && i<j){
            T=*(ans+i);
            *(ans+i)=*(ans+j);
            *(ans+j)=T;
        }
    }
    *(ans+first)=*(ans+i);
    *(ans+i)=temp;
    qsort(ans,first,i-1);
    qsort(ans,i+1,end);
    return;
}


int main(int argc, char const *argv[])
{
    int ans[1000001];
    int N;
    scanf("%d",&N);
    for (int i = 0; i < N; i++) scanf("%d",&ans[i]);
    qsort(ans,0,N-1);
    for (int i = 0; i < N; i++) printf("%d ",ans[i]);
    return 0;
}
